package com.cloudfun.campusshare.common.model.vo;

import com.cloudfun.campusshare.common.constant.ApplicationResult;
import com.cloudfun.campusshare.common.constant.ApplicationStatus;
import com.cloudfun.campusshare.common.constant.LoanStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Created by Huqin on 2020/3/7
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "融资贷款申请详情")
public class LoanApplyDetailVO {

    @ApiModelProperty("融资贷款信息")
    private LoanSimpleVO loanInfo;

    @ApiModelProperty("关联项目信息")
    private List<LoanDetailProjectVO> projectInfos;

    @ApiModelProperty("申请信息")
    private ApplicationSimpleVO applicationInfo;

    @ApiModelProperty("放款信息")
    private ApplicationSimpleVO issueInfo;

    @Data
    public static class LoanSimpleVO {

        @ApiModelProperty("融资贷款id")
        private String id;

        @ApiModelProperty("贷款人Id")
        private String borrowerId;

        @ApiModelProperty("贷款人企业名称")
        private String borrowerEnterpriseName;

        @ApiModelProperty("贷款金额")
        private Double loanAmount;

        @ApiModelProperty("用途说明")
        private String purpose;

        @ApiModelProperty("资产汇总表url")
        private String assetSummaryFileUrl;

        @ApiModelProperty("资产汇总表名称")
        private String assetSummaryFileName;

        @ApiModelProperty(value = "状态")
        private LoanStatus status;

        @ApiModelProperty(value = "放款金额")
        private Double issueAmount;

        @ApiModelProperty(value = "放款时间")
        private String issueTime;

        @ApiModelProperty(value = "放款确认时间")
        private String confirmTime;
    }

    @Data
    public static class ApplicationSimpleVO {

        @ApiModelProperty("申请id")
        private String id;

        @ApiModelProperty("状态")
        private ApplicationStatus status;

        @ApiModelProperty("结果")
        private ApplicationResult result;

        @ApiModelProperty("备注")
        private String remark;

        @ApiModelProperty("审核信息列表")
        private List<AuditVO> auditVoList;
    }
}
